//
//  HUDUtil.h
//  ZKFrameWork
//
//  Created by 熊国兵 on 2018/4/4.
//  Copyright © 2018年 熊国兵. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <SVProgressHUD/SVProgressHUD.h>

@interface HUDUtil : UIView

/**显示loding标记*/
+ (void)show;
//只有文字弹窗
+ (void)showStr:(NSString *)str;
//带有转动圆圈   可不传文字 
+ (void)loadingWithString:(NSString *)string;

/**
 带有进度条的loading

 @param progress 进度值
 */
+ (void)loadingWithProgress:(CGFloat)progress;

+ (void)dismiss;

//返回当前的VC
+ (UIViewController *)topViewController;

//获取当前控制器的导航栏
+ (UINavigationController *)getNav;

//基于AlertViewController的封装 
+ (void)showWithTitle:(NSString *)title viewController:(UIViewController *)vc handler:(void(^)(UIAlertAction * action))handler;
+ (void)showWithTitle:(NSString *)title message:(NSString *)message viewController:(UIViewController *)vc handler:(void(^)(UIAlertAction * action))handler;
+ (void)showWithTitle:(NSString *)title message:(NSString *)message cancel:(NSString *)cancelTitle sure:(NSString *)sureTitle viewController:(UIViewController *)vc handler:(void(^)(UIAlertAction * action))handler;
+ (void)showWithTitle:(NSString *)title message:(NSString *)message cancel:(NSString *)cancelTitle sure:(NSString *)sureTitle viewController:(UIViewController *)vc cancelHandler:(void(^)(UIAlertAction * action))cancelHandler handler:(void(^)(UIAlertAction * action))handler;
//显示actionsheet，index从1开始，0是取消，默认不处理
+  (void)showSheetWithTitle:(NSString *)title message:(NSString *)message vc:(UIViewController *)vc indexBlock:(void(^)(NSInteger index))indexBlock cancelTitle:(NSString *)canceTitle otherTitle:(NSString *)otherTitle,...NS_REQUIRES_NIL_TERMINATION;

+ (void)shakeWithView:(UIView *)view;
+ (void)continueShakeWithView:(UIView *)view;
+ (void)removeShakeWithView:(UIView *)view;

@end
